import React, { useState, useEffect } from 'react'

export default function Count(props) {
  console.log('count更新', props)
  return (
    <div>
      count
      <hr />
      <p>{props.c}</p>
      <button
        onClick={() => {
          props.dispatch({ type: 'add' })
        }}
      >
        +
      </button>
      <button>-</button>
    </div>
  )
}
